package com.create.abstractd.factory;

import com.create.simple.factory.Default;

/**
 * 形状工厂
 *
 * @author xiaobing
 * @version 1.0
 * @date 2021/9/6 2:42 下午
 */
public class ShapeFactory extends AbstractFactory{
    @Override
    Color getColor(String key) {
        return null;
    }
    @Override
    public Shape getShape(String key) {
        switch (key) {
            case "Circle":
                return new Circle();
            case "Rectangle":
                return new Rectangle();
            case "Square":
                return new Square();
            default:
                return new Default();
        }
    }


}
